package com.park.service.impl.msg;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.msg.NoticeModel;
import com.park.client.service.msg.NoticeService;
import com.park.dao.msg.NoticeMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("noticeService")
public class NoticeServiceImpl extends BaseServiceImpl<NoticeModel> implements NoticeService {
	
	@Autowired
	private NoticeMapper noticeMapper;
	

	@Override
	public List<NoticeModel> listRelUser(Map<String,Object> map) {
		return noticeMapper.listRelUser(map);
	}

	@Override
	public void updateClickRate(Integer id) {
		noticeMapper.updateClickRate(id);
	}

	@Override
	public NoticeModel getPrevById(Integer id) {
		return noticeMapper.getPrevById(id);
	}

	@Override
	public NoticeModel getBackById(Integer id) {
		return noticeMapper.getBackById(id);
	}

	@Override
	public boolean insert(NoticeModel notice) {
		return noticeMapper.insert(notice)==1;
	}

	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return noticeMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insertSelective(NoticeModel record) {
		return noticeMapper.insertSelective(record)==1;
	}

	@Override
	public NoticeModel selectByPrimaryKey(Long id) {
		return noticeMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(NoticeModel record) {
		return noticeMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(NoticeModel record) {
		return noticeMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<NoticeModel> selectAll() {
		return noticeMapper.selectAll();
	}

	@Override
	public boolean updateByPrimaryKeyWithBLOBs(NoticeModel record) {
		return false;
	}

	@Override
	public List<NoticeModel> selectPagination(NoticeModel record) {
		return noticeMapper.selectPagination(record);
	}

	@Override
	public Integer selectTotal(NoticeModel record) {
		return noticeMapper.selectTotal(record);
	}

}
